<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button @click="a--" :disabled="a<=1">-</button>
        <div>{{a}}</div>
        <button @click="a++" :disabled="a>=10">+</button>
    </div>
</body>
 <script src="Vue.js"></script>
 <script>
    const {createApp ,ref} = Vue
    let app = createApp({
        setup() {
            let a = ref(1)
            return {
                a
            }
        }
    }).mount("#app")
 </script>
</html>